#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
@Project: DataStructure-Python
@File: Queue.py
@Author: Dragon Geek
@Date: 2021/4/19 10:15
@Description: Bubble Sort Algorithm
"""


class Queue(object):
    def __init__(self):
        self.__list = []

    # 向队列尾部添加一个元素
    def enqueue(self, item):
        self.__list.append(item)
        # self.__list.insert(0, item)

    # 从队列头部删除一个元素
    def dequeue(self, item):
        return self.__list.pop(0)
        # return self.__list.pop()

    # 判断队列是否为空
    def is_empty(self):
        return self.__list == []

    # 输出队列的大小
    def size(self):
        return len(self.__list)


if __name__ == "__main__":
    Queue_01 = Queue()
    print(Queue_01.size())
    print(Queue_01.is_empty())
    Queue_01.enqueue(1)
    print(Queue_01.is_empty())
    print(Queue_01.size())
